import Vue from "vue";
import VueRouter from "vue-router"

//使用路由懒加载引入路由
const Home = ()=>import("@pages/Home")
const Login = ()=>import("@pages/Login")
const Search = ()=>import("@pages/Search")
const Register = ()=>import("@pages/Register")



Vue.use(VueRouter)
export default new  VueRouter({
    mode:"history",
    routes:[
      {
        path:"/home",
        component:Home,
        name:"home",
      
       
    },
    {
        path:"/search",
        component:Search,
        name:"search"
    },
    {
        path:"/login",
        component:Login,
        name:"login",
        meta: { footerIsHidden: true },
    },
    {
        path:"/register",
        component:Register,
        name:"register",
        meta: { footerIsHidden: true },
    },
    // {
    //     path:"/",
    //     redirect:"/home"
    // }
    ],
       

    
})